#include <iostream>
#include <header.h>
using std::cout;
using std::endl;

/* 数组指针 */
void test4(){
	int arr[5] = {1, 2, 3, 4, 5};
	cout << arr + 1 << endl;
	cout << &arr + 1 << endl;

	int (*p)[5] = &arr;
	for (size_t i = 0; i < 5; i++){
		cout << (*p)[i] << "";
	}
	cout << endl;
	
}


/* 指针数组 */
void test5(){
	int num1 = 4, num2 = 5, num3 = 6;
	int *p1 = &num1;
	int *p2 = &num2;
	int *p3 = &num3;
	int *arr[3] = {p1, p2, p3};

	for(int idx = 0; idx < 3; ++idx){
		cout << *arr[idx] << "";
	}
	cout << endl;
}


void print(){
	cout << "print()" << endl;
}
/* 函数指针 */
void test6(){
	void (*p)() = print;
	p();

	// void (*p2)() = &print;
}





int main(int argc, char* argv[]){
	ARGS_CHECK(argc, 1);

	return 0;
}